package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.SchemeTemplateItemExample.E_AMOUNT_COMPANY;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_AMOUNT_PERSONAL;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_CARDINALITY_DEFAULT;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_CARDINALITY_MAX;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_CARDINALITY_MIN;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_PERSENT_COMPANY;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_PERSENT_PERSONAL;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_SORT;
import static org.jsola.hr.example.SchemeTemplateItemExample.E_TEMPLATE_ID;
import static org.jsola.hr.example.SchemeTemplateItemExample.M_AMOUNT_COMPANY_NOT_NULL;
import static org.jsola.hr.example.SchemeTemplateItemExample.M_AMOUNT_PERSONAL_NOT_NULL;
import static org.jsola.hr.example.SchemeTemplateItemExample.M_CARDINALITY_DEFAULT_NOT_NULL;
import static org.jsola.hr.example.SchemeTemplateItemExample.M_CARDINALITY_MAX_NOT_NULL;
import static org.jsola.hr.example.SchemeTemplateItemExample.M_CARDINALITY_MIN_NOT_NULL;
import static org.jsola.hr.example.SchemeTemplateItemExample.M_TEMPLATE_ID_MAX;
import static org.jsola.hr.example.SchemeTemplateItemExample.M_TEMPLATE_ID_NOT_NULL;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_AMOUNT_COMPANY;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_AMOUNT_PERSONAL;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_CARDINALITY_DEFAULT;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_CARDINALITY_MAX;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_CARDINALITY_MIN;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_PERSENT_COMPANY;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_PERSENT_PERSONAL;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_SORT;
import static org.jsola.hr.example.SchemeTemplateItemExample.N_TEMPLATE_ID;

/**
 * 参保方案模板子项
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【参保方案模板子项】的参数")
@Data
public class SchemeTemplateItemAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_TEMPLATE_ID, example = E_TEMPLATE_ID, required = true)
    @NotNull(message = M_TEMPLATE_ID_NOT_NULL)
    @Length(max = 32, message = M_TEMPLATE_ID_MAX)
    private String templateId;

    @ApiModelProperty(notes = N_CARDINALITY_MIN, example = E_CARDINALITY_MIN, required = true)
    @NotNull(message = M_CARDINALITY_MIN_NOT_NULL)
    private BigDecimal cardinalityMin;

    @ApiModelProperty(notes = N_CARDINALITY_MAX, example = E_CARDINALITY_MAX, required = true)
    @NotNull(message = M_CARDINALITY_MAX_NOT_NULL)
    private BigDecimal cardinalityMax;

    @ApiModelProperty(notes = N_PERSENT_COMPANY, example = E_PERSENT_COMPANY)
    private BigDecimal persentCompany;

    @ApiModelProperty(notes = N_CARDINALITY_DEFAULT, example = E_CARDINALITY_DEFAULT, required = true)
    @NotNull(message = M_CARDINALITY_DEFAULT_NOT_NULL)
    private BigDecimal cardinalityDefault;

    @ApiModelProperty(notes = N_PERSENT_PERSONAL, example = E_PERSENT_PERSONAL)
    private BigDecimal persentPersonal;

    @ApiModelProperty(notes = N_AMOUNT_COMPANY, example = E_AMOUNT_COMPANY, required = true)
    @NotNull(message = M_AMOUNT_COMPANY_NOT_NULL)
    private BigDecimal amountCompany;

    @ApiModelProperty(notes = N_AMOUNT_PERSONAL, example = E_AMOUNT_PERSONAL, required = true)
    @NotNull(message = M_AMOUNT_PERSONAL_NOT_NULL)
    private BigDecimal amountPersonal;

    @ApiModelProperty(notes = N_SORT, example = E_SORT)
    private Integer sort;


}

